package com.wjk.kylin.core.constant;

/**
 * 通用常量信息
 * 
 * @author ruoyi
 */
public class Constants {
    //==========================验证码===============================
    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "admin:captcha-codes:";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 3*60;

    //======================token===================================
    /**
     * secret
     */
    public static final String SECRET = "WJKlsm87f";
    /**
     * 过期时间
     */
    public static final Long EXPIRATION = 24 * 60 * 60L;//30 * 24 * 60 * 60L 1 天
    /**
     * Token 类型
     */
    public static final String TOKEN_TYPE_BEARER = "Bearer";
    /**
     * 携带Token的HTTP头
     */
    public static final String TOKEN_HEADER = "Authorization";
    /**
     * 权限缓存前缀
     */
    public static final String REDIS_PREFIX_AUTH = "admin:kylin-user-token:";

    /**
     * 用户信息缓存前缀
     */
    public static final String REDIS_PREFIX_USER = "admin:kylin-user-details:";

    //====================================================================
    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    //===================================================================
    /**
     * 参数配置缓存 redis key
     */
    public static final String CACHE_CONFIG_REDIS_KEY = "admin:kylin-config";
    //
    /**
     * 字典缓存 redis key
     */
    public static final String CACHE_DICT_REDIS_KEY = "admin:kylin-dict:";

    //==============================================================
    public static final String IMAGE_TYPE_JPG = ".jpg";// 联合照片专家组
    public static final String IMAGE_TYPE_PNG = ".png";// 可移植网络图形

    /**
     * 导出数据 redis key
     */
//    public static final String EXPORT_DATA_REDIS_KEY = "admin:export-data-key:";
}
